package graphisme;

import javax.swing.JFrame;
import javax.swing.SwingUtilities;
import javax.swing.UIManager;
import javax.swing.UnsupportedLookAndFeelException;

public class Nimbus {

	public static void changeToNimbus(JFrame f)  
    {  
    /*********************
     * Description : Permet de changer de LookAndFeel, il va vers un Nimbus
     * 				Cette classe pemet de changer de look and feel dans n'importe quel IHM
     * Auteur : Valentin & Alexis
     * Date   : 13/01/2015
     * 
     *********************/
        try  
        {  
        	//javax.swing.plaf.nimbus.NimbusLookAndFeel.s
        	//javax.swing.plaf.TabbedPaneUI;
        	//UIManager.put("JTabbedPane.Color",Color.green);
        	//UIManager.put("nimbusBlueGrey",Color.green);
        	//UIManager.put("control", Color.green);
  
        	//UIManager.put("TabbedPane.Color", Color.green);
        	// On change ici le LookAndFeel
        	
            UIManager.setLookAndFeel("javax.swing.plaf.nimbus.NimbusLookAndFeel");
        	
            
        }  
        catch(ClassNotFoundException cnfe)  
        {  
            System.err.println("class not found: " + cnfe.getMessage());  
        }  
        catch(InstantiationException ie)  
        {  
            System.err.println("instantiation: " + ie.getMessage());  
        }  
        catch(IllegalAccessException iae)  
        {  
            System.err.println("illegal access: " + iae.getMessage());  
        }  
        catch(UnsupportedLookAndFeelException ulafe)  
        {  
            System.err.println("unsupported laf: " + ulafe.getMessage());  
        }  
        SwingUtilities.updateComponentTreeUI(f.getRootPane());
        
        
    } 
}
